<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>缺陷隐患记录</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="referrer" content="never" />
		<link rel="stylesheet" href="../../../css/mui.min.css">
		<link rel="stylesheet" href="../static/css/common.css" />	
		<link rel="stylesheet" href="../static/components/components.css" />	
		<link rel="stylesheet" href="../static/css/terminalwork.css" />	
		<script src="../../../js/mui.min.js"></script>
		<script src="../../../js/vue.js"></script>
		<script type="text/javascript" src="../../../js/jquery-3.2.1.min.js"></script>
		<script type="text/javascript" src="../static/js/neiosRequst.js"></script>  <!--请求接口页面必需-->
		<script src="../static/js/neiosCommon.js"></script>  <!--公共js页面必需-->
		<script src="../static/components/personSelect.js"></script>
		<script src="../static/components/multipleSelect.js"></script>
		<style>
			.defect-info-list{
				border-bottom:1px solid #ddd;
				margin:0 5vw 8px
			}
			.defect-info-list:last-child{
				border-bottom:none;
				margin:0 5vw
			}
		</style>
	</head>
	<body>
		<div id="terminalwork">
			<div class="top">
				<div class="search-model" style="width:calc(100% - 15vw)">
					<div class="mui-input-row mui-search">
						<input type="search" class="mui-input-clear" 
						style="background-color: #fff;" placeholder="请输入关键字查询"
						 v-model="terminalKeyword" maxlength="45" @input="terminalKeywordChange()">
					</div>
				</div>
				<div class="top-textall">
					<span @click="openTroubleRecordAdd()">新增</span>
				</div>
			</div>
			<div class="nodata-tips" v-if="terminalworkList.length == 0">暂无数据！</div>
			<div id="terminalworkList">
				<div class="list" id="list" v-if="isShowList">
					<div v-for="(item,index) in terminalworkList" :key="index" class="terminalwork-list-item">
						<div class="terminalwork-list-title" @click="hideOperBtn()">隐患描述：{{item.defectDesc}}</div>
						<div class="terminalwork-list-sec" @click="hideOperBtn()">
							<div>是否上报安全云：{{dictChange(checkResultTypeList,item.upReport)}}</div>
							<div>状态：{{dictChange(troubleStatusList,item.status)}}</div>
							<div>填报时间：{{item.reportTime}}</div>
						</div>
						<div class="terminalwork-list-receivebtn" onclick="showOperBtn(this)">操作</div>
						<div class="terminalwork-list-operbtn todo">
							<div class="terminalwork-list-operbtn-in" style="width:73vw">
								<div class="operbtn" @click="goDetail(item)" v-if="item.workType!='0401'" style="width:20vw">办理详情</div>
								<div class="operbtn" @click="openTroubleRecordInfo(item)" style="width:20vw">缺陷详情</div>
								<div class="operbtn" @click="openTroubleRecordClose(item)" v-if="item.status==1||item.status==0">关闭</div>
								<div class="operbtn" @click="openTroubleRecordChange(item)" style="width:30vw">调整上报状态</div>
							</div>
						</div>
					</div>
				</div>	
			</div>
			<!--缺陷详情-->
			<div class="explain-dialog" v-if="troubleRecordInfoVisible">
				<div class="explain-in">
					<div class="explain-header">缺陷隐患记录详情</div>
					<div class="explain-con">
						<div class="explain-con-title">缺陷详情</div>
						<div v-if="defectInfoInfo.workType != '0401'">
							<div v-for="(item,index) in defectInfoList" :key="index" class="defect-info-list">
								<div class="neios-form-item" style="">
									<div class="neios-form-item-lable" style="width:40%;">细节描述:</div>
									<div class="neios-form-item-con" style="width:60%;">
										{{item.defectInfoDesc}}
									</div>
								</div>
								<div class="neios-form-item">
									<div class="neios-form-item-lable" style="width:40%;">原因描述:</div>
									<div class="neios-form-item-con" style="width:60%;">
										<input type="text" placeholder="请输入原因描述"
										v-model="item.defectInfoCause" maxlength="60"/>
									</div>
								</div>
								<div class="neios-form-item">
									<div class="neios-form-item-lable" style="width:40%;">最近编辑人:</div>
									<div class="neios-form-item-con" style="width:60%;">
										<template v-if="item.modifyBy!=null&&item.modifyBy!=''">{{ "["+item.modifyBy+"]" + item.modifyStaffName }}</template>
									</div>
								</div>
								<div class="neios-form-item">
									<div class="neios-form-item-lable" style="width:40%;">最近编辑时间:</div>
									<div class="neios-form-item-con" style="width:60%;">
										{{item.modifyDate}}
									</div>
								</div>
							</div>
						</div>
						<div v-if="defectInfoInfo.workType == '0401'" style="margin:0 5vw">
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:40%;">隐患描述:</div>
								<div class="neios-form-item-con" style="width:60%;">
									{{defectInfoInfo.defectDesc}}
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:40%;">填报人:</div>
								<div class="neios-form-item-con" style="width:60%;">
									{{defectInfoInfo.reportStaffCodeName}}
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:40%;">填报时间:</div>
								<div class="neios-form-item-con" style="width:60%;">
									{{defectInfoInfo.reportTime}}
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:40%;">状态:</div>
								<div class="neios-form-item-con" style="width:60%;">
									{{defectInfoInfo.statusText}}
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:40%;">已手动上报安全云:</div>
								<div class="neios-form-item-con" style="width:60%;">
									{{selectArr}}
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:40%;">关闭人:</div>
								<div class="neios-form-item-con" style="width:60%;">
									{{defectInfoInfo.closeStaffCodeName}}
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:40%;">关闭时间:</div>
								<div class="neios-form-item-con" style="width:60%;">
									{{defectInfoInfo.closeTime}}
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:40%;">关联通知单:</div>
								<div class="neios-form-item-con" style="width:60%;">
									{{defectInfoInfo.workSheetCode}}
								</div>
							</div>
						</div>
					</div>
					<div style="display:flex">
						<div class="explain-btn explain-btn-main" style="width:50%" @click="defectInfoComfirm()">确定</div>
						<div class="explain-btn" style="width:50%" @click="closeDefectInfo()">取消</div>
					</div>
				</div>
			</div>
			<!--关闭-->
			<div class="explain-dialog" v-if="troubleRecordCloseVisible">
				<div class="explain-in">
					<div class="explain-header">关闭信息</div>
					<div class="explain-con">
						<div style="margin:15px 5vw 0">
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:30%;">关闭人:</div>
								<div class="neios-form-item-con" style="width:70%;">
									{{defectInfoCloseInfo.closeStaffCodeName}}
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:30%;">关闭时间:</div>
								<div class="neios-form-item-con" style="width:70%;">
									{{defectInfoCloseInfo.closeTime}}
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:30%;">关闭原因:<span class="red">*</span></div>
								<div class="neios-form-item-con" style="width:70%;">
									<textarea type="text" placeholder="请输入关闭原因" name="closeCause"
									v-model="defectInfoCloseInfo.closeCause" maxlength="600" @blur="checkcloseCause('closeCause')"></textarea>
								</div>
							</div>
						</div>
					</div>
					<div style="display:flex">
						<div class="explain-btn explain-btn-main" style="width:50%" @click="closeComfirm()">确定</div>
						<div class="explain-btn" style="width:50%" @click="closeInfoClose()">取消</div>
					</div>
				</div>
			</div>
			<!-- 调整上报状态 -->
			<div class="explain-dialog" v-if="troubleRecordChangeVisible">
				<div class="explain-in">
					<div class="explain-header">上报信息</div>
					<div class="explain-con">
						<div style="margin:15px 5vw 0">
							<div class="neios-form-explain">已手动上报到安全云请勾选是</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:10%;"></div>
								<div class="neios-form-item-con" style="width:90%;">
									<div style="padding:2vw 5vw" v-for="(item,index) in checkResultTypeList">
										<input type="radio" name="reoubleChangeRadio" :value="item.itemValue" 
										style="width:4vw;height:4vw"/>
										<span>{{item.itemText}}</span>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div style="display:flex">
						<div class="explain-btn explain-btn-main" style="width:50%" @click="changeComfirm()">确定</div>
						<div class="explain-btn" style="width:50%" @click="changeClose()">取消</div>
					</div>
				</div>
			</div>
			
			<!-- 新增 -->
			<div class="explain-dialog" v-if="troubleRecordAddVisible">
				<div class="explain-in">
					<div class="explain-header">新增缺陷隐患记录</div>
					<div class="explain-con">
						<div class="explain-con-title">缺陷隐患记录</div>
						<div style="margin:15px 5vw 0">
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:40%;">隐患描述:<span class="red">*</span></div>
								<div class="neios-form-item-con" style="width:60%;">
									<input type="text" placeholder="请输入隐患描述"
									v-model="defectAddInfo.defectDesc" maxlength="60" name="addDesc"
									 @blur="checkAddDesc('addDesc')"/>
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:40%;">填报人:</div>
								<div class="neios-form-item-con" style="width:60%;">
									{{defectAddInfo.reportStaffCodeName}}
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:40%;">填报时间:</div>
								<div class="neios-form-item-con" style="width:60%;">
									{{defectAddInfo.reportTime}}
								</div>
							</div>
							<div class="neios-form-item">
								<div class="neios-form-item-lable" style="width:50%;">已手动上报安全云:<span class="red">*</span></div>
								<div class="neios-form-item-con" style="width:50%;display:flex;" >
									<div style="padding:2vw 5vw" v-for="(item,index) in checkResultTypeList">
										<input type="radio" name="addRadio" :value="item.itemValue" 
										style="width:4vw;height:4vw"/>
										<span>{{item.itemText}}</span>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div style="display:flex">
						<div class="explain-btn explain-btn-main" style="width:50%" @click="addComfirm()">确定</div>
						<div class="explain-btn" style="width:50%" @click="addClose()">取消</div>
					</div>
				</div>
			</div>
		</div>
		<script src="troubleList.js"></script>
	</body>
</html>
